fn main(){
    let arr = [1,2,3];
    let mut min = 0;
    let mut max = 0;
    get_min_max(arr,&mut min,&mut max);
    println!("min is {}, max is {} ",min,max);
}
fn get_min_max(arr: [i32;3],min :&mut i32, max:&mut i32){
    *min = arr[0];
    *max = arr[0];
    for num in arr {
        if num > *max {
            *max = num;
        }
        if num < *min {
            *min = num
        }
    }
}